/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_spsongs")
//@NamedQueries({@NamedQuery(name = "SongSpsongs.findAll", query = "SELECT s FROM SongSpsongs s"), @NamedQuery(name = "SongSpsongs.findBySpsongId", query = "SELECT s FROM SongSpsongs s WHERE s.spsongId = :spsongId"), @NamedQuery(name = "SongSpsongs.findBySongId", query = "SELECT s FROM SongSpsongs s WHERE s.songId = :songId"), @NamedQuery(name = "SongSpsongs.findBySpcode", query = "SELECT s FROM SongSpsongs s WHERE s.spcode = :spcode"), @NamedQuery(name = "SongSpsongs.findByServicecode", query = "SELECT s FROM SongSpsongs s WHERE s.servicecode = :servicecode"), @NamedQuery(name = "SongSpsongs.findByStatus", query = "SELECT s FROM SongSpsongs s WHERE s.status = :status"), @NamedQuery(name = "SongSpsongs.findByCreatedDate", query = "SELECT s FROM SongSpsongs s WHERE s.createdDate = :createdDate")})
public class SongSpsongs implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "spsongId")
    private Integer spsongId;
    @Basic(optional = false)
    @Column(name = "songId")
    private int songId;
    @Basic(optional = false)
    @Column(name = "spcode")
    private String spcode;
    @Column(name = "servicecode")
    private String servicecode;
    @Basic(optional = false)
    @Column(name = "status")
    private String status;
    @Column(name = "createdDate")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createdDate;

    public SongSpsongs() {
    }

    public SongSpsongs(Integer spsongId) {
        this.spsongId = spsongId;
    }

    public SongSpsongs(Integer spsongId, int songId, String spcode, String status) {
        this.spsongId = spsongId;
        this.songId = songId;
        this.spcode = spcode;
        this.status = status;
    }

    public Integer getSpsongId() {
        return spsongId;
    }

    public void setSpsongId(Integer spsongId) {
        this.spsongId = spsongId;
    }

    public int getSongId() {
        return songId;
    }

    public void setSongId(int songId) {
        this.songId = songId;
    }

    public String getSpcode() {
        return spcode;
    }

    public void setSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getServicecode() {
        return servicecode;
    }

    public void setServicecode(String servicecode) {
        this.servicecode = servicecode;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Date getCreatedDate() {
        return createdDate;
    }

    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (spsongId != null ? spsongId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongSpsongs)) {
            return false;
        }
        SongSpsongs other = (SongSpsongs) object;
        if ((this.spsongId == null && other.spsongId != null) || (this.spsongId != null && !this.spsongId.equals(other.spsongId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongSpsongs[spsongId=" + spsongId + "]";
    }

}
